package com.jwater.core.utils;

/**
 * @description:
 * @author: jnner
 * @createDate: 2021/2/5
 * @version: 1.0
 */
public class SysType {
    public static final String WINDOWS = "windows";
    public static final String LINUX = "linux";
    public static final String UNKNOWN = "unknown";

    /**
     * 获取系统类型
     *
     * @return
     */
    public static String getSysType() {
        String os = System.getProperty("os.name").toLowerCase();
        String sysType = UNKNOWN;
        if (os.indexOf("windows") > -1) {
            sysType = WINDOWS;
        } else if (os.indexOf("linux") > -1) {
            sysType = LINUX;
        }
        return sysType;
    }
}
